<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
    <title>Donxon SDK Docs</title>
    <link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

<div id="container">

<div id="product">
	<div id="product_logo"></div>
	<div id="product_name"><big><b></b></big></div>
	<div id="product_description"></div>
</div> <!-- id="product" -->


<div id="main">


<!-- Menu -->

<div id="navigation">
<br/>
<h1>Donxon SDK</h1>

<ul>
  <li><a href="../index.html">Index</a></li>
</ul>

<h2>Contents</h2>
<ul>
<li><a href="#Data_Structures">Data Structures</a></li>
<li><a href="#Tables">Tables</a></li>
<li><a href="#Fields">Fields</a></li>
<li><a href="#Methods">Methods</a></li>
<li><a href="#Event_Callbacks">Event Callbacks </a></li>
<li><a href="#Metamethods">Metamethods</a></li>
</ul>


<h2>Classes</h2>
<ul class="nowrap">
  <li><a href="../classes/Debug.html">Debug</a></li>
  <li><a href="../classes/StringBuffer.html">StringBuffer</a></li>
  <li><a href="../classes/Hook.html">Hook</a></li>
  <li><a href="../classes/System.UTF8.html">System.UTF8</a></li>
  <li><a href="../classes/Common.Color.html">Common.Color</a></li>
  <li><a href="../classes/Common.Vector2D.html">Common.Vector2D</a></li>
  <li><a href="../classes/Common.Vector.html">Common.Vector</a></li>
  <li><a href="../classes/Common.NetMessage.html">Common.NetMessage</a></li>
  <li><a href="../classes/Common.TextMenu.html">Common.TextMenu</a></li>
  <li><a href="../classes/Common.ScreenFade.html">Common.ScreenFade</a></li>
  <li><a href="../classes/Common.HUDText.html">Common.HUDText</a></li>
  <li><a href="../classes/Game.NetMessage.html">Game.NetMessage</a></li>
  <li><strong>Game.TextMenu</strong></li>
  <li><a href="../classes/Game.ScreenFade.html">Game.ScreenFade</a></li>
  <li><a href="../classes/Game.BarTime.html">Game.BarTime</a></li>
  <li><a href="../classes/UI.Rectangle.html">UI.Rectangle</a></li>
  <li><a href="../classes/UI.ProgressBar.html">UI.ProgressBar</a></li>
  <li><a href="../classes/UI.TextMenu.html">UI.TextMenu</a></li>
  <li><a href="../classes/UI.ScreenFade.html">UI.ScreenFade</a></li>
  <li><a href="../classes/UI.BarTime.html">UI.BarTime</a></li>
</ul>
<h2>Globals</h2>
<ul class="nowrap">
  <li><a href="../globals/Properties.html">Properties</a></li>
  <li><a href="../globals/Functions.html">Functions</a></li>
  <li><a href="../globals/Classes.html">Classes</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
  <li><a href="../modules/System.html">System</a></li>
  <li><a href="../modules/Common.html">Common</a></li>
  <li><a href="../modules/Game.html">Game</a></li>
  <li><a href="../modules/UI.html">UI</a></li>
</ul>
<h2>Topics</h2>
<ul class="">
  <li><a href="../topics/changelog.md.html">changelog</a></li>
  <li><a href="../topics/credit.md.html">credit</a></li>
  <li><a href="../topics/license.html">license</a></li>
</ul>
<h2>Examples</h2>
<ul class="nowrap">
  <li><a href="../examples/bartime.game.lua.html">bartime.game.lua</a></li>
  <li><a href="../examples/bartime.ui.lua.html">bartime.ui.lua</a></li>
  <li><a href="../examples/deltatiming.game.lua.html">deltatiming.game.lua</a></li>
  <li><a href="../examples/deltatiming.ui.lua.html">deltatiming.ui.lua</a></li>
  <li><a href="../examples/hook.game.lua.html">hook.game.lua</a></li>
  <li><a href="../examples/netmsg.simple.common.lua.html">netmsg.simple.common.lua</a></li>
  <li><a href="../examples/netmsg.simple.game.lua.html">netmsg.simple.game.lua</a></li>
  <li><a href="../examples/netmsg.simple.ui.lua.html">netmsg.simple.ui.lua</a></li>
  <li><a href="../examples/progressbar.ui.lua.html">progressbar.ui.lua</a></li>
  <li><a href="../examples/rectangle.ui.lua.html">rectangle.ui.lua</a></li>
  <li><a href="../examples/screenfade.game.lua.html">screenfade.game.lua</a></li>
  <li><a href="../examples/screenfade.ui.lua.html">screenfade.ui.lua</a></li>
  <li><a href="../examples/stringbuffer.lua.html">stringbuffer.lua</a></li>
  <li><a href="../examples/textmenu.simple.game.lua.html">textmenu.simple.game.lua</a></li>
  <li><a href="../examples/utf8.lua.html">utf8.lua</a></li>
  <li><a href="../examples/vector.2d.lua.html">vector.2d.lua</a></li>
  <li><a href="../examples/vector.3d.lua.html">vector.3d.lua</a></li>
</ul>

</div>

<div id="content">

<h1>Class <code>Game.TextMenu</code></h1>
<p>Game Text Menu class.</p>
<p> Main text menu class.
 To builds and displays text menus.</p>


<h2><a href="#Data_Structures">Data Structures</a></h2>
<table class="function_list">
	<tr>
	<td class="name" ><a href="#.textMenuItemProperty">.textMenuItemProperty</a></td>
	<td class="summary">The menu item's properties.</td>
	</tr>
	<tr>
	<td class="name" ><a href="#.textMenuConfiguration">.textMenuConfiguration</a></td>
	<td class="summary">The text menu configuration table.</td>
	</tr>
	<tr>
	<td class="name" ><a href="#.textMenuAddOption">.textMenuAddOption</a></td>
	<td class="summary">The <code>Game.TextMenu:Add*</code> options.</td>
	</tr>
	<tr>
	<td class="name" ><a href="#.textMenuOpenOption">.textMenuOpenOption</a></td>
	<td class="summary">The <a href="../classes/Game.TextMenu.html#Game.TextMenu:Open">Game.TextMenu:Open</a> options.</td>
	</tr>
</table>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
	<tr>
	<td class="name" ><a href="#Game.TextMenu.EXIT">Game.TextMenu.EXIT</a></td>
	<td class="summary">List of available exit modes.</td>
	</tr>
	<tr>
	<td class="name" ><a href="#Game.TextMenu.CONFIG">Game.TextMenu.CONFIG</a></td>
	<td class="summary">List of available configurations to set.</td>
	</tr>
</table>
<h2><a href="#Fields">Fields</a></h2>
<table class="function_list">
	<tr>
	<td class="name" ><a href="#Game.TextMenu.item">Game.TextMenu.item</a></td>
	<td class="summary">The menu items.</td>
	</tr>
</table>
<h2><a href="#Methods">Methods</a></h2>
<table class="function_list">
	<tr>
	<td class="name" ><a href="#Game.TextMenu:Create">Game.TextMenu:Create (title)</a></td>
	<td class="summary">Constructs a text menu builder.</td>
	</tr>
	<tr>
	<td class="name" ><a href="#Game.TextMenu:Get">Game.TextMenu:Get ([configName])</a></td>
	<td class="summary">Gets the menu configuration(s).</td>
	</tr>
	<tr>
	<td class="name" ><a href="#Game.TextMenu:Set">Game.TextMenu:Set (configs[, ...])</a></td>
	<td class="summary">Sets the menu configuration(s).</td>
	</tr>
	<tr>
	<td class="name" ><a href="#Game.TextMenu:GetSelectableItems">Game.TextMenu:GetSelectableItems ()</a></td>
	<td class="summary">Gets all selectable items from this menu.</td>
	</tr>
	<tr>
	<td class="name" ><a href="#Game.TextMenu:GetItem">Game.TextMenu:GetItem (index)</a></td>
	<td class="summary">Gets an item from this menu.</td>
	</tr>
	<tr>
	<td class="name" ><a href="#Game.TextMenu:AddItem">Game.TextMenu:AddItem (displayText[, userData[, isDisabled=false[, isVisualOnly=false[, pos]]]])</a></td>
	<td class="summary">Adds an item to this menu.</td>
	</tr>
	<tr>
	<td class="name" ><a href="#Game.TextMenu:AddText">Game.TextMenu:AddText (displayText[, isVisualOnly=false[, pos]])</a></td>
	<td class="summary">Adds a text line to this menu.</td>
	</tr>
	<tr>
	<td class="name" ><a href="#Game.TextMenu:AddBlank">Game.TextMenu:AddBlank ([isVisualOnly=false[, pos]])</a></td>
	<td class="summary">Adds a blank line to this menu.</td>
	</tr>
	<tr>
	<td class="name" ><a href="#Game.TextMenu:Open">Game.TextMenu:Open ([player=nil[, displayTime=-1[, pageIndex=1]]])</a></td>
	<td class="summary">Opens this menu.</td>
	</tr>
	<tr>
	<td class="name" ><a href="#Game.TextMenu:Close">Game.TextMenu:Close (player)</a></td>
	<td class="summary">Closes a player's menu.</td>
	</tr>
	<tr>
	<td class="name" ><a href="#Game.TextMenu:GetItemCount">Game.TextMenu:GetItemCount ()</a></td>
	<td class="summary">Gets the number of selectable items in this menu.</td>
	</tr>
	<tr>
	<td class="name" ><a href="#Game.TextMenu:GetMaxItemPerPage">Game.TextMenu:GetMaxItemPerPage ()</a></td>
	<td class="summary">Gets allowed maximum items per page.</td>
	</tr>
	<tr>
	<td class="name" ><a href="#Game.TextMenu:GetPageCount">Game.TextMenu:GetPageCount ()</a></td>
	<td class="summary">Gets the number of pages in this menu.</td>
	</tr>
	<tr>
	<td class="name" ><a href="#Game.TextMenu:ToString">Game.TextMenu:ToString ()</a></td>
	<td class="summary">Returns the title of this menu.</td>
	</tr>
</table>
<h2><a href="#Event_Callbacks">Event Callbacks </a></h2>
<table class="function_list">
	<tr>
	<td class="name" ><a href="#Game.TextMenu:OnSlotSelected">Game.TextMenu:OnSlotSelected (player, slot, page, item)</a></td>
	<td class="summary">Called when this menu's slot is selected.</td>
	</tr>
</table>
<h2><a href="#Metamethods">Metamethods</a></h2>
<table class="function_list">
	<tr>
	<td class="name" ><a href="#Game.TextMenu.__index">Game.TextMenu.__index</a></td>
	<td class="summary">Base class.</td>
	</tr>
	<tr>
	<td class="name" ><a href="#Game.TextMenu.__tostring">Game.TextMenu.__tostring</a></td>
	<td class="summary">Returns the title of this menu.</td>
	</tr>
</table>

<br/>
<br/>


    <h2 class="section-header "><a name="Data_Structures"></a>Data Structures</h2>

    <dl class="function">
    <dt>
    <a name = ".textMenuItemProperty"></a>
    <strong>.textMenuItemProperty</strong>
    </dt>
    <dd>
    The menu item's properties.


    <ul>
        <li><span class="parameter">text</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
         The display text.
        </li>
        <li><span class="parameter">userdata</span>
            <span class="types"><span class="type">anything</span></span>
         A variable for storing arbitrary data.
         (<em>default</em> nil)
        </li>
        <li><span class="parameter">isDisabled</span>
            <span class="types"><span class="type">boolean</span></span>
         The item has grey color and won't invokes callback.
         (<em>default</em> false)
        </li>
        <li><span class="parameter">isVisualOnly</span>
            <span class="types"><span class="type">boolean</span></span>
         The item should be a visual shift only (not shifting the slot numbering down).
         (<em>default</em> false)
        </li>
    </ul>





</dd>
    <dt>
    <a name = ".textMenuConfiguration"></a>
    <strong>.textMenuConfiguration</strong>
    </dt>
    <dd>
    The text menu configuration table.


    <ul>
        <li><span class="parameter">itemPerPage</span>
            <span class="types"><span class="type">number</span></span>
         Number of items per page (0 = no paginating)(minimum = 1).
         (<em>default</em> 7)
        </li>
        <li><span class="parameter">backName</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
         Name of the back button.
         (<em>default</em> "Back")
        </li>
        <li><span class="parameter">nextName</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
         Name of the next button.
         (<em>default</em> "More")
        </li>
        <li><span class="parameter">exitName</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
         Name of the exit button.
         (<em>default</em> "Exit")
        </li>
        <li><span class="parameter">title</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
         Menu title text.
         (<em>default</em> "New text menu")
        </li>
        <li><span class="parameter">exit</span>
            <span class="types"><span class="type">number</span></span>
         Exit mode.
         (<em>default</em> Game.TextMenu.EXIT.ALL)
        </li>
        <li><span class="parameter">noColors</span>
            <span class="types"><span class="type">boolean</span></span>
         Sets whether colors are not auto-assigned.
         (<em>default</em> false)
        </li>
        <li><span class="parameter">numberColor</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
         Color indicator to use for slot numbers.
         (<em>default</em> "\r")
        </li>
        <li><span class="parameter">pageCallback</span>
            <span class="types"><span class="type">boolean</span></span>
         Whether to forward pagination slots to text menu callback.
         (<em>default</em> false)
        </li>
        <li><span class="parameter">showPage</span>
            <span class="types"><span class="type">boolean</span></span>
         Whether to show the page number in menu title.
         (<em>default</em> true)
        </li>
        <li><span class="parameter">extraSlots</span>
            <span class="types"><span class="type">boolean</span></span>
         Whether to use slot #8, #9, and #0 for items if possible.
         (<em>default</em> false)
        </li>
    </ul>





</dd>
    <dt>
    <a name = ".textMenuAddOption"></a>
    <strong>.textMenuAddOption</strong>
    </dt>
    <dd>
    The <code>Game.TextMenu:Add*</code> options.


    <ul>
        <li><span class="parameter">text</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
         The display text.
        </li>
        <li><span class="parameter">userdata</span>
            <span class="types"><span class="type">anything</span></span>
         A variable for storing arbitrary data.
         (<em>optional</em>)
        </li>
        <li><span class="parameter">position</span>
            <span class="types"><span class="type">number</span></span>
         The menu item position.
         (<em>optional</em>)
        </li>
        <li><span class="parameter">disabled</span>
            <span class="types"><span class="type">boolean</span></span>
         The item has grey color and won't invokes callback.
         (<em>default</em> false)
        </li>
        <li><span class="parameter">visualOnly</span>
            <span class="types"><span class="type">boolean</span></span>
         The item should be a visual shift only (not shifting the slot numbering down).
         (<em>default</em> false)
        </li>
    </ul>





</dd>
    <dt>
    <a name = ".textMenuOpenOption"></a>
    <strong>.textMenuOpenOption</strong>
    </dt>
    <dd>
    The <a href="../classes/Game.TextMenu.html#Game.TextMenu:Open">Game.TextMenu:Open</a> options.


    <ul>
        <li><span class="parameter">player</span>
            <span class="types"><span class="type">Game.Player</span> or <span class="type">nil</span></span>
         A player that receive this menu. | All connected players will receive this menu.
         (<em>default</em> nil)
        </li>
        <li><span class="parameter">duration</span>
            <span class="types"><span class="type">number</span></span>
         If >=0 menu will timeout after this many seconds (maximum = 255 seconds)(-2 = Don't change currently time set).
         (<em>default</em> -1)
        </li>
        <li><span class="parameter">page</span>
            <span class="types"><span class="type">number</span></span>
         Page to start from (starting from 1).
         (<em>default</em> 1)
        </li>
    </ul>





</dd>
</dl>
    <h2 class="section-header "><a name="Tables"></a>Tables</h2>

    <dl class="function">
    <dt>
    <a name = "Game.TextMenu.EXIT"></a>
    <strong>Game.TextMenu.EXIT</strong>
    </dt>
    <dd>
    List of available exit modes.


    <h3>Fields:</h3>
    <ul>
        <li><span class="parameter">ALL</span>
        Menu will have an exit option (default).
        </li>
        <li><span class="parameter">NEVER</span>
        Menu will not have an exit option.
        </li>
    </ul>





</dd>
    <dt>
    <a name = "Game.TextMenu.CONFIG"></a>
    <strong>Game.TextMenu.CONFIG</strong>
    </dt>
    <dd>
    List of available configurations to set.


    <h3>Fields:</h3>
    <ul>
        <li><span class="parameter">ITEM_PER_PAGE</span>
        Number of items per page.
        </li>
        <li><span class="parameter">BACK_NAME</span>
        Name of the back button.
        </li>
        <li><span class="parameter">NEXT_NAME</span>
        Name of the next button.
        </li>
        <li><span class="parameter">EXIT_NAME</span>
        Name of the exit button.
        </li>
        <li><span class="parameter">TITLE</span>
        Menu title text.
        </li>
        <li><span class="parameter">EXIT</span>
        Exit mode.
        </li>
        <li><span class="parameter">NO_COLORS</span>
        Sets whether colors are not auto-assigned.
        </li>
        <li><span class="parameter">NUMBER_COLOR</span>
        Color indicator to use for slot numbers.
        </li>
        <li><span class="parameter">PAGE_CALLBACK</span>
        Whether to forward pagination slots to text menu callback.
        </li>
        <li><span class="parameter">SHOW_PAGE</span>
        Whether to show the page number in menu title.
        </li>
        <li><span class="parameter">EXTRA_SLOTS</span>
        Whether to use slot #8, #9, and #0 for items if possible.
        </li>
    </ul>





</dd>
</dl>
    <h2 class="section-header "><a name="Fields"></a>Fields</h2>

    <dl class="function">
    <dt>
    <a name = "Game.TextMenu.item"></a>
    <strong>Game.TextMenu.item</strong>
    </dt>
    <dd>
    The menu items.


    <ul>
        <li><span class="parameter">item</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>



        </li>
    </ul>





</dd>
</dl>
    <h2 class="section-header "><a name="Methods"></a>Methods</h2>

    <dl class="function">
    <dt>
    <a name = "Game.TextMenu:Create"></a>
    <strong>Game.TextMenu:Create (title)</strong>
    </dt>
    <dd>
    Constructs a text menu builder.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">title</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">nil</span></span>
         The menu title to set. Sets to <code>nil</code> to excludes title.
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><a class="type" href="../classes/Game.TextMenu.html#">Game.TextMenu</a></span>
        A new text menu builder.
    </ol>




</dd>
    <dt>
    <a name = "Game.TextMenu:Get"></a>
    <strong>Game.TextMenu:Get ([configName])</strong>
    </dt>
    <dd>
    Gets the menu configuration(s).


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">configName</span>
            <span class="types"><a class="type" href="../classes/Game.TextMenu.html#Game.TextMenu.CONFIG">Game.TextMenu.CONFIG</a></span>
         The name of the configuration to get.
         (<em>optional</em>)
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><span class="type">anything</span> or <a class="type" href="../classes/Game.TextMenu.html#.textMenuConfiguration">.textMenuConfiguration</a></span>
        Returns the configuration value(s).
    </ol>




</dd>
    <dt>
    <a name = "Game.TextMenu:Set"></a>
    <strong>Game.TextMenu:Set (configs[, ...])</strong>
    </dt>
    <dd>
    Sets the menu configuration(s).


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">configs</span>
            <span class="types"><a class="type" href="../classes/Game.TextMenu.html#Game.TextMenu.CONFIG">Game.TextMenu.CONFIG</a> or <a class="type" href="../classes/Game.TextMenu.html#.textMenuConfiguration">.textMenuConfiguration</a></span>
         The configuration to set (Name of the configuration | Configurations table).
        </li>
        <li><span class="parameter">...</span>
         The configuration parameters to set (Ignored if <code>configs</code> is a table).
         (<em>optional</em>)
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><span class="type">self</span></span>
        This text menu.
    </ol>




</dd>
    <dt>
    <a name = "Game.TextMenu:GetSelectableItems"></a>
    <strong>Game.TextMenu:GetSelectableItems ()</strong>
    </dt>
    <dd>
    Gets all selectable items from this menu.



    <h3>Returns:</h3>
    <ol>

           <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
        All selectable items.
    </ol>




</dd>
    <dt>
    <a name = "Game.TextMenu:GetItem"></a>
    <strong>Game.TextMenu:GetItem (index)</strong>
    </dt>
    <dd>
    Gets an item from this menu.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">index</span>
            <span class="types"><span class="type">number</span></span>
         The menu item index.
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><a class="type" href="../classes/Game.TextMenu.html#.textMenuItemProperty">.textMenuItemProperty</a></span>
        A menu item property.
    </ol>




</dd>
    <dt>
    <a name = "Game.TextMenu:AddItem"></a>
    <strong>Game.TextMenu:AddItem (displayText[, userData[, isDisabled=false[, isVisualOnly=false[, pos]]]])</strong>
    </dt>
    <dd>
    Adds an item to this menu.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">displayText</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <a class="type" href="../classes/Game.TextMenu.html#.textMenuAddOption">.textMenuAddOption</a></span>
         The display text. | Options table.
        </li>
        <li><span class="parameter">userData</span>
            <span class="types"><span class="type">anything</span></span>
         A variable for storing arbitrary data (Ignored if <code>displayText</code> is a table).
         (<em>optional</em>)
        </li>
        <li><span class="parameter">isDisabled</span>
            <span class="types"><span class="type">boolean</span></span>
         The item has grey color and won't invokes callback (Ignored if <code>displayText</code> is a table).
         (<em>default</em> false)
        </li>
        <li><span class="parameter">isVisualOnly</span>
            <span class="types"><span class="type">boolean</span></span>
         The item should be a visual shift only (not shifting the slot numbering down)(Ignored if <code>displayText</code> is a table).
         (<em>default</em> false)
        </li>
        <li><span class="parameter">pos</span>
            <span class="types"><span class="type">number</span></span>
         The menu item position (Ignored if <code>displayText</code> is a table).
         (<em>optional</em>)
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><span class="type">self</span></span>
        This text menu.
    </ol>




</dd>
    <dt>
    <a name = "Game.TextMenu:AddText"></a>
    <strong>Game.TextMenu:AddText (displayText[, isVisualOnly=false[, pos]])</strong>
    </dt>
    <dd>
    Adds a text line to this menu.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">displayText</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <a class="type" href="../classes/Game.TextMenu.html#.textMenuAddOption">.textMenuAddOption</a></span>
         The display text. | Options table.
        </li>
        <li><span class="parameter">isVisualOnly</span>
            <span class="types"><span class="type">boolean</span></span>
         The line should be a visual shift only (not shifting the slot numbering down)(Ignored if <code>displayText</code> is a table).
         (<em>default</em> false)
        </li>
        <li><span class="parameter">pos</span>
            <span class="types"><span class="type">number</span></span>
         The menu item position (Ignored if <code>displayText</code> is a table).
         (<em>optional</em>)
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><span class="type">self</span></span>
        This text menu.
    </ol>




</dd>
    <dt>
    <a name = "Game.TextMenu:AddBlank"></a>
    <strong>Game.TextMenu:AddBlank ([isVisualOnly=false[, pos]])</strong>
    </dt>
    <dd>
    Adds a blank line to this menu.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">isVisualOnly</span>
            <span class="types"><span class="type">boolean</span> or <a class="type" href="../classes/Game.TextMenu.html#.textMenuAddOption">.textMenuAddOption</a></span>
         The line should be a visual shift only (not shifting the slot numbering down). | Options table.
         (<em>default</em> false)
        </li>
        <li><span class="parameter">pos</span>
            <span class="types"><span class="type">number</span></span>
         The menu item position (Ignored if <code>isVisualOnly</code> is a table).
         (<em>optional</em>)
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><span class="type">self</span></span>
        This text menu.
    </ol>




</dd>
    <dt>
    <a name = "Game.TextMenu:Open"></a>
    <strong>Game.TextMenu:Open ([player=nil[, displayTime=-1[, pageIndex=1]]])</strong>
    </dt>
    <dd>
    Opens this menu.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">player</span>
            <span class="types"><span class="type">Game.Player</span>, <span class="type">nil</span> or <a class="type" href="../classes/Game.TextMenu.html#.textMenuOpenOption">.textMenuOpenOption</a></span>
         A player that receive this menu. | All connected players will receive this menu. | Options table.
         (<em>default</em> nil)
        </li>
        <li><span class="parameter">displayTime</span>
            <span class="types"><span class="type">number</span></span>
         If >=0 menu will timeout after this many seconds (maximum = 255 seconds)(-2 = Don't change currently time set)(Ignored if <code>player</code> is a table).
         (<em>default</em> -1)
        </li>
        <li><span class="parameter">pageIndex</span>
            <span class="types"><span class="type">number</span></span>
         Page to start from (starting from 1)(Ignored if <code>player</code> is a table).
         (<em>default</em> 1)
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><span class="type">self</span></span>
        This text menu.
    </ol>




</dd>
    <dt>
    <a name = "Game.TextMenu:Close"></a>
    <strong>Game.TextMenu:Close (player)</strong>
    </dt>
    <dd>
    Closes a player's menu. </p>

<p> Effectively forcing the player to select exit slot.
 The menu will removed on their screen, any results are invalidated and the callback is invoked.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">player</span>
            <span class="types"><span class="type">Game.Player</span></span>
         The player.
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><span class="type">self</span></span>
        This text menu, if any.
    </ol>




</dd>
    <dt>
    <a name = "Game.TextMenu:GetItemCount"></a>
    <strong>Game.TextMenu:GetItemCount ()</strong>
    </dt>
    <dd>
    Gets the number of selectable items in this menu.



    <h3>Returns:</h3>
    <ol>

           <span class="types"><span class="type">number</span></span>
        The number of selectable items in this menu.
    </ol>




</dd>
    <dt>
    <a name = "Game.TextMenu:GetMaxItemPerPage"></a>
    <strong>Game.TextMenu:GetMaxItemPerPage ()</strong>
    </dt>
    <dd>
    Gets allowed maximum items per page.



    <h3>Returns:</h3>
    <ol>

           <span class="types"><span class="type">number</span></span>
        Maximum items per page.
    </ol>




</dd>
    <dt>
    <a name = "Game.TextMenu:GetPageCount"></a>
    <strong>Game.TextMenu:GetPageCount ()</strong>
    </dt>
    <dd>
    Gets the number of pages in this menu.



    <h3>Returns:</h3>
    <ol>

           <span class="types"><span class="type">number</span></span>
        The number of pages in this menu.
    </ol>




</dd>
    <dt>
    <a name = "Game.TextMenu:ToString"></a>
    <strong>Game.TextMenu:ToString ()</strong>
    </dt>
    <dd>
    Returns the title of this menu.



    <h3>Returns:</h3>
    <ol>

           <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
        The title of this text menu.
    </ol>




</dd>
</dl>
    <h2 class="section-header "><a name="Event_Callbacks"></a>Event Callbacks </h2>

    <dl class="function">
    <dt>
    <a name = "Game.TextMenu:OnSlotSelected"></a>
    <strong>Game.TextMenu:OnSlotSelected (player, slot, page, item)</strong>
    </dt>
    <dd>
    Called when this menu's slot is selected. </p>

<p> <strong>Note:</strong> This event is using <a href="../classes/Hook.html#">Hook</a> management.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">player</span>
            <span class="types"><span class="type">Game.Player</span></span>
         The player who accessing this menu.
        </li>
        <li><span class="parameter">slot</span>
            <span class="types"><span class="type">number</span> or <a class="type" href="../classes/Common.TextMenu.html#Common.TextMenu.STATUS">Common.TextMenu.STATUS</a></span>
         The selected item slot. | The menu status code.
        </li>
        <li><span class="parameter">page</span>
            <span class="types"><span class="type">number</span></span>
         Current menu page index.
        </li>
        <li><span class="parameter">item</span>
            <span class="types"><a class="type" href="../classes/Game.TextMenu.html#.textMenuItemProperty">.textMenuItemProperty</a> or <span class="type">nil</span></span>
         The menu item property.
        </li>
    </ul>



    <h3>See also:</h3>
    <ul>
         <a href="../classes/UI.TextMenu.html#UI.TextMenu:SelectMenuItem">UI.TextMenu:SelectMenuItem</a>
    </ul>


</dd>
</dl>
    <h2 class="section-header "><a name="Metamethods"></a>Metamethods</h2>

    <dl class="function">
    <dt>
    <a name = "Game.TextMenu.__index"></a>
    <strong>Game.TextMenu.__index</strong>
    </dt>
    <dd>
    Base class.


    <ul>
        <li><span class="parameter">__index</span>
            <span class="types"><a class="type" href="../classes/Game.TextMenu.html#">Game.TextMenu</a></span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "Game.TextMenu.__tostring"></a>
    <strong>Game.TextMenu.__tostring</strong>
    </dt>
    <dd>
    Returns the title of this menu.


    <ul>
        <li><span class="parameter">__tostring</span>
            <span class="types"><a class="type" href="../classes/Game.TextMenu.html#Game.TextMenu:ToString">Game.TextMenu.ToString</a></span>



        </li>
    </ul>





</dd>
</dl>


</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-06-15 21:15:36 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>
